home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3x / cpusetMoveMigrate.z / cpusetMoveMigrate
Encoding:
Text File  |  2002-10-03  |  5.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ccccppppuuuusssseeeettttMMMMoooovvvveeeeMMMMiiiiggggrrrraaaatttteeee((((3333xxxx))))                                    ccccppppuuuusssseeeettttMMMMoooovvvveeeeMMMMiiiiggggrrrraaaatttteeee((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cpusetMoveMigrate - move processes, identified by an ID, and their
  10.      associate memory from one cpuset to another
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ccccppppuuuusssseeeetttt....hhhh>>>>
  14.  
  15.      iiiinnnntttt ccccppppuuuusssseeeettttMMMMoooovvvveeeeMMMMiiiiggggrrrraaaatttteeee((((cccchhhhaaaarrrr ****ffffrrrroooommmm____qqqqnnnnaaaammmmeeee,,,, cccchhhhaaaarrrr ****ttttoooo____qqqqnnnnaaaammmmeeee,,,, iiiinnnntttt iiiiddddttttyyyyppppeeee,,,,
  16.                      iiiinnnntttt66664444____tttt iiiidddd))));;;;
  17.  
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      The _c_p_u_s_e_t_M_o_v_e_M_i_g_r_a_t_e function is used to move processes and their
  21.      associated memory, identified by _iiii_dddd from one cpuset to another.
  22.  
  23.      The _ffff_rrrr_oooo_mmmm______qqqq_nnnn_aaaa_mmmm_eeee argument is the name of the cpuset from which the
  24.      processes are moved. Using a NULL for this argument will result in having
  25.      all the processes identified by _iiii_dddd to be moved into the global cpuset.
  26.      The global cpuset is a term used to describe all the CPUS that are not in
  27.      a cpuset.
  28.  
  29.      The _tttt_oooo______qqqq_nnnn_aaaa_mmmm_eeee argument is the name of the destination cpuset for the
  30.      specified ID.  Using a NULL for this argument will result in having all
  31.      the processes identified by _iiii_dddd to be moved into the global cpuset.
  32.  
  33.      The _iiii_dddd_tttt_yyyy_pppp_eeee argument defines the type of number passed in as _iiii_dddd.  The
  34.      possible options for _iiii_dddd_tttt_yyyy_pppp_eeee are _CCCC_PPPP_UUUU_SSSS_EEEE_TTTT______PPPP_IIII_DDDD (Process ID), _CCCC_PPPP_UUUU_SSSS_EEEE_TTTT______AAAA_SSSS_HHHH
  35.      (Array Session Handle), _CCCC_PPPP_UUUU_SSSS_EEEE_TTTT______PPPP_GGGG_IIII_DDDD (Process Group ID), _CCCC_PPPP_UUUU_SSSS_EEEE_TTTT______SSSS_IIII_DDDD
  36.      (Session ID), and _CCCC_PPPP_UUUU_SSSS_EEEE_TTTT______JJJJ_IIII_DDDD (Job ID).  The use of _CCCC_PPPP_UUUU_SSSS_EEEE_TTTT______JJJJ_IIII_DDDD will result
  37.      in an ENOPKG error on systems running the IRIX maintenance stream, or
  38.      those running the IRIX feature stream but without the job limits package
  39.      installed.
  40.  
  41.      This function requires the processes associated with _iiii_dddd to be stopped
  42.      before it can enact the move.  A test is made to see if all the processes
  43.      are stopped.  If _iiii_dddd has processes A, B, and C and B is stopped, A and C
  44.      will be stopped. Then, after the move, A and C will be restarted (but not
  45.      B).
  46.  
  47.      This function requires root privileges on standard IRIX, and
  48.      CAP_SCHED_MGMT on Trusted IRIX (TRIX).
  49.  
  50. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  51.      This example moves a process ID from the cpuset queue named mpi_set to
  52.      the cpuset queue named my_set.
  53.  
  54.                char *from_qname = "mpi_set";
  55.                char *to_qname = "my_set";
  56.                int64_t id = 1534;
  57.  
  58.                /* move from mpi_set to my_set,
  59.                 * if error - print error & exit
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccppppuuuusssseeeettttMMMMoooovvvveeeeMMMMiiiiggggrrrraaaatttteeee((((3333xxxx))))                                    ccccppppuuuusssseeeettttMMMMoooovvvveeeeMMMMiiiiggggrrrraaaatttteeee((((3333xxxx))))
  71.  
  72.  
  73.  
  74.                 */
  75.                if (!cpusetMoveMigrate(from_qname, to_qname,
  76.                                            CPUSET_PID, id)) {
  77.                    perror("cpusetMoveMigrate");
  78.                    exit(1);
  79.                }
  80.  
  81.  
  82. NNNNOOOOTTTTEEEESSSS
  83.      _c_p_u_s_e_t_M_o_v_e_M_i_g_r_a_t_e is found in the library "libcpuset.so", and will be
  84.      loaded if the option _----_llll_cccc_pppp_uuuu_ssss_eeee_tttt is used with _cccc_cccc(1) or _llll_dddd(1).
  85.  
  86. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  87.      cpuset(1), cpusetCreate(3x), cpusetMove(3x), cpuset(5).
  88.  
  89. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  90.      If successful, _c_p_u_s_e_t_M_o_v_e_M_i_g_r_a_t_e returns a 1.  If _c_p_u_s_e_t_M_o_v_e_M_i_g_r_a_t_e
  91.      fails, it returns the value 0 and eeeerrrrrrrrnnnnoooo is set to indicate the error.
  92.      The possible values for eeeerrrrrrrrnnnnoooo are the same as those used by _s_y_s_m_p(2).
  93.      With any error, an attempt is made to move the processes back to their
  94.      originating cpuset.
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                                                         PPPPaaaaggggeeee 2222
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.